<?php
/**
 * IMMOPHP
 * @author Drouche Romain
 * @contact contact@immophp.fr
 * @website www.immophp.fr
 * */
require 'kernel/common.php';

if(!$Session->check_admin()) redirect('index.php');

require_once IMMOPHP_ADMIN_ROOT_PATH . 'kernel/Groupe.class.php';
require_once IMMOPHP_ADMIN_ROOT_PATH . 'kernel/GroupeManager.class.php';

$Groupe = new Groupe($paramClass);
$GroupeManager = new GroupeManager($paramClass);

// Manager
if( isset($_POST['add']) ) $GroupeManager->setAdd();
if( isset($_GET['delete'])) $GroupeManager->setDelete();
if( isset($_POST['edit']) ) $GroupeManager->setEdit();

$Groupe->getAll();

$smarty->assign('lang', $lang);
$smarty->assign('token', $Session->_session['token']);

$smarty->display('groupe.tpl');

require_once 'footer.php';
?>